]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Fix expand animation for submenus
authorOwen W. Taylor <otaylor@fishsoup.net>
Thu, 31 Mar 2011 19:51:38 +0000 (15:51 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Mon, 4 Apr 2011 12:23:37 +0000 (08:23 -0400)
Figuring out the size of an unmapped actor is not completely
reliable because styles aren't fully assigned until an actor
is mapped. So show the submenu before computing the size we
want to tween to.

https://bugzilla.gnome.org/show_bug.cgi?id=645949

js/ui/popupMenu.js

index 99e7a336d684a9b33bc91330698e11d9f4628609..1f31c18a4f5eed358fc86b41f755722d0c04c2c2 100644 (file)
@@ -1059,9 +1059,9 @@ PopupSubMenu.prototype = {
         // we don't implement the !animate case because that doesn't
         // currently get used...
 
+        this.actor.show();
         let [naturalHeight, minHeight] = this.actor.get_preferred_height(-1);
         this.actor.height = 0;
-        this.actor.show();
         this.actor._arrow_rotation = this._arrow.rotation_angle_z;
         Tweener.addTween(this.actor,
                          { _arrow_rotation: 90,